<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <ui:composition template="/shared/_layout.xhtml">
        <ui:define name="title">
            Espace d'administration de BooXtore.com
        </ui:define>
        <ui:define name="css">
            <h:outputStylesheet library="css" name="form.css"/>
        </ui:define>
        <ui:define name="content">
            <f:event listener="#{accountLogin.isNotLogged()}" type="preRenderView" />
            <h1>Création d'un nouvel auteur</h1>
            <h:form>
                <p>
                    <h:messages errorClass="errorMessage" infoClass="infoMessage" warnClass="warnMessage"/>
                </p>
                <p>
                    <h:outputLabel value="Nom" for="name"/>
                    <h:inputText id="name" value="#{authorManager.author.name}" label="Nom" required="true" size="45" maxlength="45"/>
                    <h:commandButton action="#{authorManager.create()}" value="Créer"/>
                </p>
            </h:form>
            <p>
                <h:link outcome="/index" class="back" value="Retour"/>
            </p>
        </ui:define>
    </ui:composition>
</html>